<?php
define ("DS", DIRECTORY_SEPARATOR);

$GLOBALS["BEMARX_VERSION"]    = "1.0.0";
$GLOBALS["BEMARX_HOME"]       = "c:/desarrollo/Bemarx/";
$GLOBALS["BEMARX_EXTRAS"]     = $GLOBALS["BEMARX_HOME"] . "Extras" . DS;

if (!preg_match ("/^127\.0.+/", $_SERVER["SERVER_ADDR"]))
{
	$GLOBALS["BEMARX_HOME"]       = "/var/www/vhosts/Bemarx/";
	$GLOBALS["BEMARX_EXTRAS"]     = $GLOBALS["BEMARX_HOME"] . "Extras" . DS;
}

function bload ($componente)
{
	$includes  = $GLOBALS["BEMARX_HOME"] . $componente;
	$includes .= DS . "includes.php";
	$existe    = file_exists($includes);

	if ($existe)
	{
		include_once ($includes);
	}
}

function bxload ($componente)
{
	$includes  = $GLOBALS["BEMARX_EXTRAS"] . $componente;
	$includes .= DS . "includes.php";
	$existe    = file_exists($includes);

	if ($existe)
	{
		include_once ($includes);
	}
}
?>